home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 10479 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: gryphon.phoenix.net!usenet
  2. From: brucew@phoenix.net (Bruce Wedding)
  3. Newsgroups: comp.lang.c
  4. Subject: Can a structure element be static?
  5. Date: Mon, 18 Mar 1996 04:56:55 GMT
  6. Organization: BranPaul Systems
  7. Message-ID: <4iiqgm$3n3@gryphon.phoenix.net>
  8. NNTP-Posting-Host: dial108.phoenix.net
  9. X-Newsreader: Moe's Newsreader    
  10.  
  11. I was recently asked if a struct element can be static.  I
  12. replied of course not, since all elements of a struct have to be
  13. contiguous, the entire struct has to be static.  I then searched
  14. the standard.  I can't really pin down a spot that would disallow
  15. this other than the inference one can draw from the statement
  16. that all addresses must be in order. 
  17.  
  18. In any event, I don't own a compiler that will accept a static
  19. element, and I've tried it on 5 compilers.  The poser claims that
  20. such a struct will compile on TC 1.0 for dos and BC 4.5 for dos.
  21. Not having either, I have no way of verifying these statements.
  22.  
  23.  
  24. Bruce D. Wedding                        Have Compiler, Will Travel!
  25.               Perspicacious Programming Performed Promptly
  26. Katy, Texas, USA, Planet Earth, Milkyway Galaxy, Known Universe
  27.  
  28.